home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 145 / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin / tools / sharp / sxwork1i.lzh / SXWORK1.XDF / INCLUDE / CONTROL.H < prev    next >
Text File  |  1994-02-20  |  3KB  |  161 lines

  1. /*
  2.  * control.h X68k SX_SYSTEM ver 2.01 Copyright 1994 SHARP/First Class Technology
  3.  */
  4. #ifndef __CONTROL_H
  5. #define __CONTROL_H
  6.  
  7. #ifndef __SXDEF2_H
  8. #include <sxdef2.h>
  9. #endif
  10.  
  11. #ifdef FORWORD
  12. #define __PROTO_TYPE
  13. #endif
  14. #ifdef __STDC__
  15. #define __PROTO_TYPE
  16. #endif
  17.  
  18. typedef enum CDEFRscID    CDEFRscID;
  19. typedef enum CDEFCommand CDEFCommand;
  20. typedef enum CPartCode    CPartCode;
  21.  
  22. typedef struct CNTL    CNTL;
  23. /*
  24.  *    コントロールマン (Control Man)
  25.  */
  26. #define C_DEFAULT    ((void *) -1)
  27.  
  28. enum CDEFRscID {
  29.     CI_CHRBTN,
  30.     CI_RADBTN,
  31.     CI_CHKBOX,
  32.     CI_SLDVOL    = 0x13,
  33.     CI_ADJBTN,
  34.     CI_SCLBRWH    = 0x40,
  35.     CI_SCLBRWV,
  36.     CI_SCRLBRH,
  37.     CI_SCRLBRV
  38. };
  39.  
  40. enum CDEFCommand {
  41.     CMD_CDRAW,
  42.     CMD_CWHERE,
  43.     CMD_CCALC,
  44.     CMD_CINIT,
  45.     CMD_CDISP,
  46.     CMD_CPOS,
  47.     CMD_CTHUMB,
  48.     CMD_CDRAG,
  49.     CMD_CTRACK
  50. };
  51.  
  52. enum CPartCode {
  53.     C_INBTTN    =  10,
  54.     C_INCHECK,
  55.     C_INDEC        =  20,
  56.     C_ININC,
  57.     C_INUP        =  20,
  58.     C_INDOWN,
  59.     C_INPGUP,
  60.     C_INPGDOWN,
  61.     C_INTITLE,
  62.     C_INTHUMB    = 129,
  63.     C_ACTIVE    =   0,
  64.     C_INACTIVE    = 255
  65. };
  66.  
  67. struct Control {
  68.     Control **next;
  69.     Window *window;
  70.     Rect rect;
  71.     char visible;
  72.     char hilite;
  73.     short value;
  74.     short min;
  75.     short max;
  76.     long (**def)();
  77.     unsigned short option;
  78.     long defData;
  79.     long (*proc)();
  80.     long user;
  81.     LASCII title;
  82. };
  83.  
  84. struct CNTL {
  85.     Rect bounds;
  86.     short value;
  87.     short visible;
  88.     short max;
  89.     short min;
  90.     short ID;
  91.     long user;
  92.     LASCII title;
  93. };
  94.  
  95. #ifdef __PROTO_TYPE
  96.  
  97. Control **CMOpen(Window *, Rect *, const _LASCII, BOOLEAN, int, int, int, int, long);
  98. int CMDispose(Control **);
  99. int CMKill(Window *);
  100. int CMHide(Control **);
  101. int CMShow(Control **);
  102. int CMDraw(Window *);
  103. int CMDrawOne(Control **);
  104. int CMValueSet(Control **, int);
  105. int CMValueGet(Control **);
  106. int CMMinSet(Control **, int);
  107. int CMMinGet(Control **);
  108. int CMMaxSet(Control **, int);
  109. int CMMaxGet(Control **);
  110. int CMMove(Control **, LPoint);
  111. int CMSize(Control **, LPoint);
  112. int CMShine(Control **, int);
  113. int CMFind(LPoint, Window *, Control ***);
  114. int CMCheck(Control **, LPoint, void (*)());
  115. Control **CMRefer(int, Window *);
  116. int CMTitleGet(Control **, _LASCII);
  117. int CMDraws(Window *, Region **);
  118. int CMTitleSet(Control **, const _LASCII);
  119. unsigned short CMOptionGet(Control **);
  120. void CMOptionSet(Control **, unsigned short);
  121. long CMUserGet(Control **);
  122. void CMUserSet(Control **, long);
  123. long CMDefDataGet(Control **);
  124. void CMDefDataSet(Control **, long);
  125.  
  126. #undef __PROTO_TYPE
  127. #else
  128.  
  129. Control **CMOpen();
  130. int CMDispose();
  131. int CMKill();
  132. int CMHide();
  133. int CMShow();
  134. int CMDraw();
  135. int CMDrawOne();
  136. int CMValueSet();
  137. int CMValueGet();
  138. int CMMinSet();
  139. int CMMinGet();
  140. int CMMaxSet();
  141. int CMMaxGet();
  142. int CMMove();
  143. int CMSize();
  144. int CMShine();
  145. int CMFind();
  146. int CMCheck();
  147. Control **CMRefer();
  148. int CMTitleGet();
  149. int CMDraws();
  150. int CMTitleSet();
  151. unsigned short CMOptionGet();
  152. void CMOptionSet();
  153. long CMUserGet();
  154. void CMUserSet();
  155. long CMDefDataGet();
  156. void CMDefDataSet();
  157.  
  158. #endif __PROTO_TYPE
  159.  
  160. #endif __CONTROL_H
  161.